const express=require('express');
const router=express.Router();
const userinfo_handler=require('../router_handle/userinfo')
const expressJoi=require('@escook/express-joi')
const { update_userinfo_schema, update_password_schema, updata_avatar_schema}=require('../schema/use')
router.get('/userinfo', userinfo_handler.getUserInfo)
router.post('/userinfo', expressJoi(update_userinfo_schema),userinfo_handler.updateUserinfo)
router.post('/updatepwd', expressJoi(update_password_schema),userinfo_handler.updatePassword)
router.post('/update/avatar', expressJoi(updata_avatar_schema),userinfo_handler.updateAvatar)
module.exports=router